var qiehuan = document.querySelector('.qiehuan')
var neirong = document.querySelector('.xiangqing')
var neirong2 = document.querySelector('.pingjia')
var neirong3 = document.querySelector('.shouhou')
var bianse = document.querySelectorAll('.qiehuan .one')
console.log(bianse);
qiehuan.addEventListener('click', function(e) {
    console.log(e.target.className);

    for (let i = 0; i < bianse.length; i++) {
        bianse[i].className = 'one'
    }
    e.target.className = 'one xuanzhong'
    if (e.target.innerText == '详情') {
        neirong.style.display = 'block'
        neirong2.style.display = 'none'
        neirong3.style.display = 'none'
            // bianse[0].className = 'one xuanzhong'
            // bianse[1].className = 'one'
            // bianse[2].className = 'one'
    } else if (e.target.innerText == '评价') {
        neirong.style.display = 'none'
        neirong2.style.display = 'block'
        neirong3.style.display = 'none'
            // bianse[0].className = 'one'
            // bianse[1].className = 'one xuanzhong'
            // bianse[2].className = 'one'
    } else if (e.target.innerText == '售后') {
        neirong.style.display = 'none'
        neirong2.style.display = 'none'
        neirong3.style.display = 'block'
            // bianse[0].className = 'one'
            // bianse[1].className = 'one'
            // bianse[2].className = 'one xuanzhong'
    } else {
        return
    }
})
var pingjia1 = document.querySelector('.pingjia1')
var oli = document.querySelectorAll('.pingjia1 li')
console.log(oli);
pingjia1.addEventListener('click', function(e) {
    for (let i = 0; i < oli.length; i++) {
        oli[i].className = ''
    }
    e.target.className = 'pjbs'
})